package com.deng.commons.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

/**
 * 封装返回码和返回信息的枚举类
 */
@Getter
public enum ErrorCode {

    CODE_200(200,"请求成功"),
    CODE_400(400,"请求失败"),
    CODE_403(403,"权限不足"),
    CODE_1001(1001,"请登录之后再来访问"),
    CODE_1002(1002,"验证码不正确"),
    CODE_10021(10021,"验证码过期"),
    CODE_1003(1003,"账号或密码不正确"),
    CODE_1004(1004,"旧密码不正确"),
    CODE_1005(1005,"上传图片格式错误"),
    CODE_1006(1006,"添加用户需要指定角色"),
    CODE_1007(1007,"添加用户失败！"),
    CODE_1008(1008,"有用户拥有该角色，删除角色失败！"),
    CODE_1030(1030,"部分删除招聘信息失败，因为已经被分配！"),
    CODE_1031(1031,"要分配的人事专员不存在或者不可用！"),
    CODE_1032(1032,"只要未分配的招聘才能被分配"),
    CODE_1033(1033,"要分配的招聘信息绑定的产品跟人事专员不一致"),
    ;

    private Integer code;

    private String msg;

    ErrorCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
